package ByteStream;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class ByteStreamDemo4 {
    public static void main(String[] args) throws IOException {
        FileInputStream fos = new FileInputStream("b.txt");
        //循环读取
        int b = 0;//要定义第三方变量
   while( (b = fos.read())!= -1){
       System.out.println((char)b);
   }

        fos.close();
    }


}
